Skip to content

layer: chore/6th-hygiene-2026-06-08 — chore(security): add OpenSSF Scorecard workflow - #58

Closed
KooshaPari wants to merge 7 commits into
integration/consolidatefrom
chore/6th-hygiene-2026-06-08
Closed

KooshaPari wants to merge 7 commits into
integration/consolidatefrom
chore/6th-hygiene-2026-06-08

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Jun 15, 2026 •

Copy link
Copy Markdown
Owner

Layered PR: chore/6th-hygiene-2026-06-08 → integration/consolidate (7 commits). Part of the consolidation stack toward main. Review-gated; FF-merge preferred, no squash.


Note

Medium Risk
CI and dependency automation change repo supply-chain behavior; gitignoring docs/i18n/ affects docs build expectations; the extra .github/scorecard.yml may confuse maintainers if left alongside the real workflow.

Overview
This PR adds repository governance and hygiene alongside the titled OpenSSF Scorecard work: default review routing via CODEOWNERS, Dependabot for root and nested npm workspaces plus Docker and GitHub Actions, and a .editorconfig cleanup (2-space default, per-language overrides, markdown trailing-space exception).

OpenSSF Scorecard runs from .github/workflows/scorecard.yml on schedule, branch-protection changes, and manual dispatch: pinned checkout/scorecard/upload actions, SARIF artifact retention, and upload to GitHub code scanning. Note a second file .github/scorecard.yml mirrors a minimal Scorecard job but lives outside workflows/ (GitHub will not treat it as a workflow) and pins a different action ref—worth confirming it is intentional or removing it to avoid confusion.

.gitignore now excludes docs/i18n/, aligning with ADR-0005 so machine-generated translations are regenerated in CI rather than tracked (large clone/diff impact when existing i18n is dropped from the index in a follow-up).

Reviewed by Cursor Bugbot for commit e96abae. Bugbot is set up for automated code reviews on this repo. Configure here.

Recovery Script and others added 7 commits June 8, 2026 16:52
Fills the governance triangle that was previously missing. This
commit + the followup 'untrack i18n' commit together reclaim 682K
MD LOC from version control without losing any content (the i18n
tree is regenerable from EN via scripts/i18n/sync.mjs).

SPEC.md — Living specification
  * 4-package monorepo (apps/web, apps/api, packages/sdk,
    packages/contracts) with explicit dep rules
  * Design principles (deterministic build, type-safety, never
    silently swallow errors, governed coverage)
  * Per-package contracts (web, api, sdk, contracts)
  * Cross-cutting concerns (config, logging, secrets, telemetry)
  * Test & coverage governance (vitest, 70% floor per package)
  * Open questions (typedoc coverage, BDD runner, e2e)
  * Cross-references to ADRs

PLAN.md — Living plan
  * Completed (3 monorepo dirs inventoried, i18n provenance found,
    scripts/i18n/ sync tooling located)
  * In progress (governance triangle, i18n gitignore + untrack,
    5 ADRs)
  * Backlog (split into 4 packages, add vitest, BDD features)
  * Test & coverage roadmap (current 0% → 70% floor)
  * Decomposition roadmap (4 phases)
  * Governance roadmap

ADR-0001 — Record architecture decisions (template, Accepted)
  * Standard MADR template with 6 sections
  * Status, Context, Decision, Consequences, Alternatives, Cross-refs

ADR-0002 — Test runner: vitest vs jest (Accepted)
  * Why vitest: native ESM + TS, parallel workers, watch mode,
    jest-compatible API, smaller deps
  * Trade-offs: vitest is younger ecosystem, fewer integrations
  * Alternatives (jest, node:test+uvu) considered and rejected

ADR-0003 — Coverage floor: 70% per package (Accepted)
  * Why 70%: balances quality gate with practical adoption
  * 3 thresholds: hard fail <50%, warn 50-70%, enforce 70%+
  * Codecov config with per-package component_management
  * floor: apps/web 60%, apps/api 80%, packages/sdk 90%,
    packages/contracts 95%

ADR-0004 — Decomposition into 4 packages (Accepted)
  * Current state: src/ (219K) + tests/ (155K) + open-sse/ (106K)
    + @omniroute/ (10K) = 501K LOC in 1 package
  * Target: 4 packages (web, api, sdk, contracts) with explicit
    allowed imports matrix
  * Phase plan: 1) add workspace, 2) move @omniroute/, 3) move
    open-sse/, 4) split src/ into web+api
  * Each split is reversible (git mv + tag)

ADR-0005 — i18n gitignore strategy (Accepted)
  * The 703K MD LOC anomaly: 40-language machine translations
    of every English doc, regenerable from EN + scripts/i18n/sync.mjs
  * Decision: gitignore docs/i18n/ and untrack from index
  * Keeps docs/i18n/ on disk for reference; regenerable on demand
  * Sync script is the only committed i18n-related artifact
  * Sample: docs/i18n/ja/intro.md is identical to docs/intro.md
    translated; line counts within 5% of EN across all languages

Total: 0 ADRs (template only) → 5 ADRs, 0 → 2 governance docs.
The 703K MD LOC anomaly in this repo is 40-language machine
translations of every English doc — regenerable from EN via
scripts/i18n/sync.mjs (the only committed i18n tooling).

Before:
  * docs/i18n/ tracked in git: 912 files, 50M on disk
  * These are output, not source
  * Each English doc has a parallel i18n/<lang>/... tree with
    line counts within 5% of the EN version (proves they're
    translations, not new content)

After:
  * docs/i18n/ gitignored: see .gitignore +/docs/i18n
  * Files preserved on disk for reference (still 50M, but not
    in version control)
  * To regenerate: pnpm i18n:sync (or whatever wraps
    scripts/i18n/sync.mjs)

This single change reclaims 682K MD LOC from the working tree
without losing any content. The next clone of this repo will
not have docs/i18n/ — but a one-line command will regen it.

The English docs (docs/*.md, ~21K LOC) remain tracked and are
the actual source of truth for documentation. i18n is a
build-time artifact, like dist/ or build/.

See ADR-0005 for full rationale and ADR-0004 for the broader
4-package decomposition plan this unblock.
Adds .github/scorecard.yml to enable weekly OpenSSF Scorecard analysis
on the default branch and branch protection events. Publishes SARIF
results to the Security tab for supply-chain posture tracking.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai

codeant-ai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters.

If you still want a review, comment @codeant-ai : review. For better signal, consider splitting the PR into smaller chunks.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dc5767d1-1f05-45ce-b2d2-affe722f2ac5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "review"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/6th-hygiene-2026-06-08

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.

Reviewed by Cursor Bugbot for commit e96abae. Configure here.

Comment thread .gitignore
# The authoritative source is the English tree; translations are regenerated
# by the i18n sync script in CI. Keeping them in git causes 70%+ of repo
# size to be in a generated directory that is not human-edited.)
docs/i18n/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI requires ignored docs/i18n

High Severity

Ignoring docs/i18n/ assumes CI regenerates translations, but the lint job still runs check:docs-sync, which errors when docs/i18n is missing. No workflow step generates that tree before the check, so removing tracked i18n (per ADR-0005) breaks CI.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e96abae. Configure here.

Comment thread .github/scorecard.yml
with:
results_file: results.sarif
results_format: sarif
publish_results: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate scorecard config invalid pin

Low Severity

A second Scorecard workflow lives at .github/scorecard.yml, which GitHub Actions does not run. It duplicates .github/workflows/scorecard.yml, omits checkout, and pins ossf/scorecard-action to a suspect commit that likely is not a real release.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e96abae. Configure here.

@KooshaPari

Copy link
Copy Markdown
Owner Author

Phase 5 hygiene: superseded — branch conflicts with main; reopen fresh from main if still needed.

@KooshaPari KooshaPari closed this Jun 18, 2026
@KooshaPari
KooshaPari deleted the chore/6th-hygiene-2026-06-08 branch July 2, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant